<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>固定定位</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
        .box{
            /* 固定定位的参照物永远是浏览器窗口 */
            position: fixed;
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="box">

    </div>
</body>
</html>